.class Lcom/waiqin365/base/print/k;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/widget/AdapterView$OnItemClickListener;


# instance fields
.field final synthetic a:Lcom/waiqin365/base/print/PrintSettingActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/base/print/PrintSettingActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 5

    if-nez p3, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    invoke-static {v0}, Lcom/waiqin365/base/print/PrintSettingActivity;->a(Lcom/waiqin365/base/print/PrintSettingActivity;)Landroid/widget/ImageView;

    move-result-object v0

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    iget-object v0, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    invoke-static {v0}, Lcom/waiqin365/base/print/PrintSettingActivity;->b(Lcom/waiqin365/base/print/PrintSettingActivity;)Ljava/util/ArrayList;

    move-result-object v0

    add-int/lit8 v1, p3, -0x1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/print/a;

    iget-object v1, v0, Lcom/waiqin365/base/print/a;->b:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    invoke-static {v0}, Lcom/waiqin365/base/print/PrintSettingActivity;->c(Lcom/waiqin365/base/print/PrintSettingActivity;)Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    invoke-static {v0}, Lcom/waiqin365/base/print/PrintSettingActivity;->c(Lcom/waiqin365/base/print/PrintSettingActivity;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-static {}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->b()Lcom/fiberhome/gaea/client/base/ExmobiApp;

    move-result-object v0

    iget-object v0, v0, Lcom/fiberhome/gaea/client/base/ExmobiApp;->e:Lcom/waiqin365/base/print/b;

    invoke-virtual {v0}, Lcom/waiqin365/base/print/b;->b()Z

    move-result v0

    const/4 v2, 0x1

    if-ne v0, v2, :cond_2

    invoke-static {}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->b()Lcom/fiberhome/gaea/client/base/ExmobiApp;

    move-result-object v0

    iget-object v0, v0, Lcom/fiberhome/gaea/client/base/ExmobiApp;->e:Lcom/waiqin365/base/print/b;

    invoke-virtual {v0}, Lcom/waiqin365/base/print/b;->g()I

    move-result v0

    const/4 v2, 0x3

    if-ne v0, v2, :cond_2

    iget-object v0, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    invoke-static {v0}, Lcom/waiqin365/base/print/PrintSettingActivity;->d(Lcom/waiqin365/base/print/PrintSettingActivity;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    const-string/jumbo v1, "\u6253\u5370\u6d4b\u8bd5\u4e2d\uff0c\u8bf7\u7a0d\u540e..."

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/print/PrintSettingActivity;->showProgressDialog(Ljava/lang/String;)V

    invoke-static {}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->b()Lcom/fiberhome/gaea/client/base/ExmobiApp;

    move-result-object v0

    iget-object v0, v0, Lcom/fiberhome/gaea/client/base/ExmobiApp;->e:Lcom/waiqin365/base/print/b;

    iget-object v1, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    invoke-static {v1}, Lcom/waiqin365/base/print/PrintSettingActivity;->d(Lcom/waiqin365/base/print/PrintSettingActivity;)Ljava/lang/String;

    move-result-object v1

    const-string/jumbo v2, "GBK"

    invoke-virtual {v0, v1, v2}, Lcom/waiqin365/base/print/b;->a(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    invoke-static {}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->b()Lcom/fiberhome/gaea/client/base/ExmobiApp;

    move-result-object v2

    iget-object v2, v2, Lcom/fiberhome/gaea/client/base/ExmobiApp;->e:Lcom/waiqin365/base/print/b;

    invoke-virtual {v2, v1}, Lcom/waiqin365/base/print/b;->a(Ljava/lang/String;)Landroid/bluetooth/BluetoothDevice;

    move-result-object v2

    invoke-static {v0, v2}, Lcom/waiqin365/base/print/PrintSettingActivity;->a(Lcom/waiqin365/base/print/PrintSettingActivity;Landroid/bluetooth/BluetoothDevice;)Landroid/bluetooth/BluetoothDevice;

    invoke-static {}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->b()Lcom/fiberhome/gaea/client/base/ExmobiApp;

    move-result-object v0

    iget-object v0, v0, Lcom/fiberhome/gaea/client/base/ExmobiApp;->e:Lcom/waiqin365/base/print/b;

    iget-object v2, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    invoke-static {v2}, Lcom/waiqin365/base/print/PrintSettingActivity;->e(Lcom/waiqin365/base/print/PrintSettingActivity;)Landroid/bluetooth/BluetoothDevice;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/waiqin365/base/print/b;->a(Landroid/bluetooth/BluetoothDevice;)V

    iget-object v2, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v3, "("

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v0, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    invoke-static {v0}, Lcom/waiqin365/base/print/PrintSettingActivity;->b(Lcom/waiqin365/base/print/PrintSettingActivity;)Ljava/util/ArrayList;

    move-result-object v0

    add-int/lit8 v4, p3, -0x1

    invoke-virtual {v0, v4}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/print/a;

    iget-object v0, v0, Lcom/waiqin365/base/print/a;->a:Ljava/lang/String;

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v3, ")"

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v2, v0}, Lcom/waiqin365/base/print/PrintSettingActivity;->a(Lcom/waiqin365/base/print/PrintSettingActivity;Ljava/lang/String;)Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    const-string/jumbo v2, "\u6b63\u5728\u8fde\u63a5..."

    invoke-virtual {v0, v2}, Lcom/waiqin365/base/print/PrintSettingActivity;->showProgressDialog(Ljava/lang/String;)V

    iget-object v2, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    iget-object v0, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    invoke-static {v0}, Lcom/waiqin365/base/print/PrintSettingActivity;->b(Lcom/waiqin365/base/print/PrintSettingActivity;)Ljava/util/ArrayList;

    move-result-object v0

    add-int/lit8 v3, p3, -0x1

    invoke-virtual {v0, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/print/a;

    iget-object v0, v0, Lcom/waiqin365/base/print/a;->a:Ljava/lang/String;

    invoke-static {v2, v0}, Lcom/waiqin365/base/print/PrintSettingActivity;->b(Lcom/waiqin365/base/print/PrintSettingActivity;Ljava/lang/String;)Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/base/print/k;->a:Lcom/waiqin365/base/print/PrintSettingActivity;

    invoke-static {v0, v1}, Lcom/waiqin365/base/print/PrintSettingActivity;->c(Lcom/waiqin365/base/print/PrintSettingActivity;Ljava/lang/String;)Ljava/lang/String;

    goto/16 :goto_0
.end method
